package com.bootdo.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.system.dao.AddressMapper;
import com.bootdo.system.domain.Address;
import com.bootdo.system.service.AddressService;
import com.bootdo.system.service.BabyService;
import com.github.pagehelper.PageHelper;



@Service("addressService")
public class AddressServiceImpl implements AddressService {
	@Autowired
	private AddressMapper addressMapper;
	
	@Override
	public Address get(Long id){
		return addressMapper.get(id);
	}
	
	@Override
	public List<Address> list(Map<String, Object> map){
		PageHelper.startPage(Integer.parseInt(map.get("pageNum").toString()),Integer.parseInt(map.get("pageSize").toString()));
		return addressMapper.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return addressMapper.count(map);
	}
	
	@Override
	public int save(Address bComments){
		return addressMapper.save(bComments);
	}
	
	@Override
	public int update(Address bComments){
		return addressMapper.update(bComments);
	}
	
	@Override
	public int remove(Long id){
		return addressMapper.remove(id);
	}
	
	@Override
	public int batchRemove( Integer[] ids){
		return addressMapper.batchRemove(ids);
	}

}
